package cn.bdqn.controller.order;

import cn.bdqn.service.order.OrderReportFormsService;
import cn.bdqn.service.order.OrderStateService;
import cn.bdqn.service.order.OrderTypeService;
import cn.bdqn.service.order.UserOrderService;
import cn.bdqn.utils.Json;
import cn.bdqn.utils.Page;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Slf4j
@RestController
@RequestMapping("/api/order")
public class OrderReportFormController {


    @Autowired
    private OrderReportFormsService formsService;

    @Autowired
    private OrderStateService orderStateService;

    @Autowired
    OrderTypeService orderTypeService;


    @PostMapping("/getAllOrder")
    public Json getAllRoder(@RequestBody Page page){
        System.out.println(page);
        return formsService.getAllRoder(page);
    }

    @GetMapping("/getOderType")
    public Json getOrderType(){
        return orderTypeService.getOrderType();
    }

    @GetMapping("/getOrderState")
    public Json getOrderState(){
        return orderStateService.getOrderState();
    }

}
